#include <stdio.h>
#include<vector>
int main() {
    int array1[5] = {1, 2, 3, 4, 5};
    int array2[3] = {6, 7, 8};
    int mergedArray[8];
    int i, j;

    for (i = 0; i < 5; i++) {
        mergedArray[i] = array1[i];
    }
    for (j = 0; j < 3; j++) {
        mergedArray[i++] = array2[j];
    }
    for (i = 0; i < 8; i++) {
        printf("%d ", mergedArray[i]);
    }
    return 0;
}





